import pickle

#文件读写类，没啥好说的
class FileIO:
    #读pickle文件
    def read_file(self, file_path):
        with open(file_path, 'rb') as f:
            res = pickle.load(f)
        return res
    #写pickle文件
    def write_file(self, x, file_path):
        with open(file_path, 'wb') as f:
            pickle.dump(x, f)
